local skel = fk.CreateSkill{
  name = "lb__gongming",
  tags = {Skill.Limited}
}

Fk:loadTranslationTable{
  ["lb__gongming"] = "共鸣",
  [":lb__gongming"] = "<b>限定技</b>，出牌阶段，你可以与一名其他角色各回复或失去1点体力。",

  ["#lb__gongming"] = "共鸣：你可以与一名其他角色各回复或失去1点体力",

  ["$lb__gongming1"] = "愿歌声为我们带来胜利。",
  ["$lb__gongming2"] = "该进入新乐章了。",
}

skel:addEffect("active", {
  prompt = "#lb__gongming",
  target_num = 1,
  can_use = function(self, player)
    return player:usedSkillTimes(skel.name,Player.HistoryGame) == 0
  end,
  interaction = function (self, player)
    return UI.ComboBox{
      choices = {"recover","loseHp"},
    }
  end,
  card_filter = Util.FalseFunc,
  min_target_num = 1,
  target_filter = function (self, player, to_select, selected, selected_cards)
    return #selected == 0 and to_select ~= player
  end,
  on_use = function (self, room, effect)
    local player = effect.from
    local t = effect.tos[1]
    for _, p in ipairs({player,t}) do
      if not p.dead then
        if self.interaction.data == "loseHp" then
          room:loseHp(p,1,skel.name)
        else
          room:recover{
            who = p,
            num = 1,
            skillName = skel.name,
            recoverBy = player,
          }
        end
      end
    end
  end,
})

return skel